// const  mypackage=require('./mypackage')
// mypackage.say("我是控制方")
const  fs=require("fs")
const  path =require("path")
fs.writeFile("./fs.txt","xiejin",(e)=>{
    if(e){
        console.error(e);
        return;
    }
})

fs.readFile("./fs.txt",(e,data) =>{
    if(e){
        console.error(e);
        return;
    }else {
        console.log(data.toString())
    }
})


console.log(path.basename("./fs.txt"))
console.log(path.dirname("./fs.txt"))
console.log(path.extname("./fs.txt"))
